package com.mytaobao;

import android.app.Activity;

import com.baseproject.IBaseProjectAppConfig;
import com.baseproject.entity.User;
import com.mytaobao.main.MainActivity;
import com.mytaobao.main.cart.func.cart.ItemCommodity;

import java.util.ArrayList;
import java.util.List;

import rx.Observable;

import static com.baseproject.appconfig.ConstUrlBaseProject.TEST_URL;


public final class AppConfig implements IBaseProjectAppConfig {

    @Override
    public int getColorPrimary(Activity activity) {
        return activity.getResources().getColor(R.color.colorPrimary);
    }

    @Override
    public Class<?> getLoginActivityClass() {
        return null;
    }


    @Override
    public Observable<User> getUser() {
        return null;
    }

    public static class ConstUrl {

        public static String TEST_CART_URL = TEST_URL + "?action=getItemCommodityList";

        public static String KEY_ACTION = "action";
    }

    @Override
    public Class<?> getMainActivityClass() {
        return MainActivity.class;
    }

    @Override
    public void updateUserState(int newState) {

    }

    @Override
    public List<Class> getDatabaseModelClasses() {
        return new ArrayList<Class>() {{ add(ItemCommodity.class); }};
    }
}
